﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace RBAC.LuFang.Repository.Migrations
{
    public partial class 用户 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Countys",
                columns: table => new
                {
                    countyID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    countyName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    theCityID = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Countys", x => x.countyID);
                });

            migrationBuilder.CreateTable(
                name: "Provinces",
                columns: table => new
                {
                    provinceID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    provinceName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Provinces", x => x.provinceID);
                });

            migrationBuilder.CreateTable(
                name: "TheCitys",
                columns: table => new
                {
                    theCityID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    theCityName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    provinceID = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_TheCitys", x => x.theCityID);
                });

            migrationBuilder.CreateTable(
                name: "UserInfos",
                columns: table => new
                {
                    userInfoID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    userName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    password = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    userSex = table.Column<bool>(type: "bit", nullable: false),
                    provinceID = table.Column<int>(type: "int", nullable: false),
                    userAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    addName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    addDate = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    updName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    updDate = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserInfos", x => x.userInfoID);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Countys");

            migrationBuilder.DropTable(
                name: "Provinces");

            migrationBuilder.DropTable(
                name: "TheCitys");

            migrationBuilder.DropTable(
                name: "UserInfos");
        }
    }
}
